package com.face.server.service;

import com.face.RespMsg;
import com.face.server.entity.Dormitory;
import com.face.server.entity.DormitoryAdmin;
import com.face.server.vo.DormAdmin;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.security.Principal;

/**
 * Created by ryan on 2018/1/26.
 */
public interface DormAdminService {
    Page<DormitoryAdmin> search(Pageable pageRequest, String key1, String key2);

    Page<DormitoryAdmin> search(Pageable pageable, String key1, String key2, Principal principal);

    String update(DormitoryAdmin dormitoryAdmin);

    String delete(String id);

    DormitoryAdmin create(DormitoryAdmin dormitoryAdmin);

    RespMsg updateFace(String id, String fid, MultipartFile file) throws IOException;

    RespMsg addFace(String id, MultipartFile file) throws IOException;
}
